package com.liaoyoule.multiple.query;

/**
 * Created by 40864 on 2017/3/4.
 */
public class MultipleQuery {
    private String field;
    private String value;
    private Integer dataType = 0;
    private Integer operational = 0;

    private Boolean andOr = true;

    public String getField() {
        return field;
    }

    public void setField(String field) {
        this.field = field;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public Integer getDataType() {
        return dataType;
    }


    public Boolean getAndOr() {
        return andOr;
    }

    public void setAndOr(Boolean andOr) {
        this.andOr = andOr;
    }

    public void setDataType(Integer dataType) {
        this.dataType = dataType;
    }

    public Integer getOperational() {
        return operational;
    }

    public void setOperational(Integer operational) {
        this.operational = operational;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        MultipleQuery that = (MultipleQuery) o;

        if (field != null ? !field.equals(that.field) : that.field != null) return false;
        if (value != null ? !value.equals(that.value) : that.value != null) return false;
        if (dataType != null ? !dataType.equals(that.dataType) : that.dataType != null) return false;
        return operational != null ? operational.equals(that.operational) : that.operational == null;
    }

    @Override
    public int hashCode() {
        int result = field != null ? field.hashCode() : 0;
        result = 31 * result + (value != null ? value.hashCode() : 0);
        result = 31 * result + (dataType != null ? dataType.hashCode() : 0);
        result = 31 * result + (operational != null ? operational.hashCode() : 0);
        return result;
    }
}
